import { createSlice } from '@reduxjs/toolkit'

export const newlist = createSlice({
  name: 'newlist',
  initialState: {
    allList: [],
  },
  reducers: {
    pushList: (state, action) => {
      state.allList = action.payload
    },
  }
})
// 每个 case reducer 函数会生成对应的 Action creators
export const { pushList } = newlist.actions

export default newlist.reducer


